<?php

namespace Modules\Agent\Http\Controllers\Client\V1;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
// use \Modules\Agent\Entities\AgentRecord;

use Validator;
use ThrowException;
use Auth;
use Setting;

class SettingController extends Controller
{
    public function show(Request $req)
    {
        $rule = [
        ];
        Validator::make($req->all(), $rule)->fails() && ThrowException::BadRequest();

        $options = $req->all();

        $setting = [
        	'percent' => Setting::get('agent_brokerage_percent') ?: 0,
        	'min_withdraw' => Setting::get('agent_min_withdraw') ?: 0,
        	'agreement' => Setting::get('agent_agreement') ?: '',
        	'withdraw_type' => Setting::get('agent_withdraw_type') ?: []
        ];

        return [
        	'setting' => $setting
        ];
    }
}
